package com.isoftstone.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.isoftstone.dao.InstitutionDAO;
import com.isoftstone.pojo.Institution;
import com.isoftstone.service.InstitutionService;

@Service
public class InstitutionServiceImpl implements InstitutionService {

	@Autowired
	private InstitutionDAO institutionDAO;
	
	@Override
	public int register(Institution institution) {
		System.out.println("注册用户");
		return institutionDAO.insert(institution);
	}

	@Override
	public List<Institution> getSummary() {
		return institutionDAO.selectSummary();
	}
	
	//详细
	@Override
	public Institution detailPlaninstitution(int id) {
		return institutionDAO.selectDetail(id);
	}
	
	@Override
	public int modifyinstitution(int id) {
		return institutionDAO.deleteInstitution(id);
	}

	@Override
	public Institution selectinstitution(int id) {
		// TODO Auto-generated method stub
		return institutionDAO.selectone(id);
	}

	@Override
	public int updateinstitution(Institution institution) {
		// TODO Auto-generated method stub
		return institutionDAO.update(institution);
	}
	

}
